package com.wu.dms.scheduld;

import com.wu.dms.service.CacheService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author Cousin
 * @date 2024/10/15
 * @Description
 */
@Component
@EnableScheduling
@Slf4j
public class RefreshData {
    @Resource
    CacheService cacheService;

    @Scheduled(initialDelay = 3000,fixedDelay = 60 * 1000 * 60 * 24)
    public void  refreshAccessibleUrls(){
        cacheService.refreshAccessibleUrls();
    }
}
